import { requestClient,requestClientBody } from '#/api/request';

/**
 * 获取轮播图列表
 */
export async function getListApi() {
  return requestClient.get('/swiper/lists');
}
  
/**
 * 新增轮播图
 */
export async function createApi(data: any) {
  return requestClientBody.post('/swiper/add', {form:data});
}

/**
 * 编辑轮播图
 */
export async function editApi(data: any) {
  return requestClientBody.post('/swiper/edit?id='+data.id, {form:data});
}

/**
 * 删除轮播图
 */
export async function deleteApi(id: number) {
  return requestClientBody.post('/swiper/delete?id='+id);
}

/**
 * 轮播图详情
 */
export async function detailApi(id: number) {
  return requestClient.get('/swiper/detail?id='+id);
}